#! /usr/bin/env python
import os.path
import sys

from PyQt4.QtGui import *

import src.wa3r

if __name__ == '__main__':
    app = QApplication(sys.argv)
    app.setOrganizationName("WA3R")
    app.setApplicationName("Wa3R")
    form = src.wa3r.MainWindow()
    form.show()
    if len(sys.argv)>1:
        # TODO: replace print statement by progress bar
        print "loading ", sys.argv[1]
        if os.path.exists(sys.argv[1]):
            form.loadGame(sys.argv[1])
    app.exec_()

